// 兼容 IE
// https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill
// import 'core-js/stable'
// import 'regenerator-runtime/runtime'

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import * as dd from 'dingtalk-jsapi'

// 全局引入按需引入UI库 vant
import '@/plugins/vant'
// 引入全局样式
import '@/assets/css/index.scss'
// 引入自定义图标集
import '@/assets/font/iconfont.css'
// 移动端适配
import 'lib-flexible/flexible.js'

import '@/assets/svg.js'
import SvgIcon from '@/components/SvgIcon.vue' // svg组件
import sensors from '@/utils/sensors.js'
import Directives from '@/directives'
// filters
import './filters'
import VueXss from 'vue-xss'
Vue.use(VueXss)
Vue.prototype.$sensors = sensors
Vue.use(Directives)

sensors.registerPage({
  systemName: '寿险2021版经营管理分析系统',
  title: '寿险2021版经营管理分析系统|首页'
})

Vue.config.productionTip = false
Vue.prototype.$isIphoneX =
  /iphone/gi.test(window.navigator.userAgent) &&
  (window.screen.height === 812 || window.screen.height === 844 || window.screen.height === 896)
Vue.prototype.$dd = dd
Vue.prototype.$isDD = dd && dd.env.platform !== 'notInDingTalk'

Vue.component('svg-icon', SvgIcon)

window._vue = new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
